package com.myfoon.view.context.helper;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class DateUtils {    
    public DateUtils() {
    }
    
    public static boolean isValidDateStr(String date, String format) {
      try {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        sdf.setLenient(false);
        sdf.parse(date);
      }
      catch (ParseException e) {
        return false;
      }
      catch (IllegalArgumentException e) {
        return false;
      }
      return true;
      }
}
